package cn.xopencode.score.api.enums.accident;

import cn.xopencode.common.framework.core.IntArrayValuable;

import java.util.Arrays;

/**
 * 事故分数枚举
 */
public enum AccidentScoreEnum implements IntArrayValuable {

    TEAM_DISCOVERER(2, "班组发现人"),
    TEAM_RESPONSIBLE(-2, "班组责任人"),
    WORKSHOP_RESPONSIBLE(-3,"车间责任人"),
    WORKSHOP_OTHERS(-1,"车间同班其他人"),
    COMPANY(0,"公司级");

    public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(AccidentScoreEnum::getScore).toArray();

    /**
     *  级别
     */
    private final Integer score;
    /**
     * 描述
     */
    private final String name;

    AccidentScoreEnum(Integer score, String name) {
        this.score = score;
        this.name = name;
    }

    public Integer getScore() {
        return score;
    }

    public String getName() {
        return name;
    }

    @Override
    public int[] array() {
        return ARRAYS;
    }

}
